package com.rdxer.api.para;

import com.rdxer.core.ex.ListEx;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.stream.Collectors;

@Getter
@Setter
public class IdsStringPara {
    private String ids;
    public List<String> getStrIds(){
        String[] split = ids.split(",");
        return ListEx.toList(split).stream().collect(Collectors.toList());
    }
    public List<Long> getIds(){
        String[] split = ids.split(",");
        return ListEx.toList(split).stream().map(Long::parseLong).collect(Collectors.toList());
    }
}
